import {
    get,
    post
} from '@/utils/request'
import Vue from 'vue'


//保存专票信息
export function insertAndUpdateInvoiceApplyInfo(parm) {
    return post({
        url: Vue.prototype.$conf.baseUrl + '/api/v1/invoice/insertAndUpdateInvoiceApplyInfo',
        data: parm
    })
}

//保存开票信息
export function insertInvoiceInfo(parm) {
    return post({
        url: Vue.prototype.$conf.baseUrl + '/api/v1/invoice/insertInvoiceInfo',
        data: parm
    })
}

//获取专票信息
export function getInvoiceInfo(parm) {
    return get({
        url: Vue.prototype.$conf.baseUrl + '/api/v1/invoice/getInvoiceInfo',
        params: parm
    })
}

//获取专票信息
export function getInvoiceApplyDetail(parm) {
    return get({
        url: Vue.prototype.$conf.baseUrl + '/api/v1/invoice/getInvoiceApplyDetail',
        params: parm
    })
}

//发票列表查看
export function getOrderInfoOfInvoice(parm) {
    return get({
        url: Vue.prototype.$conf.baseUrl + '/api/v1/invoice/getOrderInfoOfInvoice',
        params: parm
    })
}

//申请开票前校验
export function buildUserIdAndCompanyId(parm) {
    return post({
        url: Vue.prototype.$conf.baseUrl + '/api/v1/invoice/buildUserIdAndCompanyId',
        data: parm
    })
}

//开票列表撤回
export function recallInvoiceInfo(parm) {
    return post({
        url: Vue.prototype.$conf.baseUrl + '/api/v1/invoice/recallInvoiceInfo',
        data: parm
    })
}

//申请开票获取总金额
export function getTotalInvoiceInfo(parm) {
    return post({
        url: Vue.prototype.$conf.baseUrl + '/api/v1/invoice/getTotalInvoiceInfo',
        data: parm
    })
}
